home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / System / Infinity Windoid 2.5.1 / WindoidDefines.h < prev    next >
Encoding:
Text File  |  1994-01-02  |  7.3 KB  |  206 lines  |  [TEXT/MPS ]

  1. //******************************************************************************
  2. //
  3. //    WindoidDefines.h
  4. //
  5. //------------------------------------------------------------------------------
  6. //    This file contains only the #define's used to determine how to compile
  7. //    the Infinity Windoid WDEF. By modifying only this file, you can choose
  8. //    what capabilities will be included when the WDEF is compiled.
  9. //******************************************************************************
  10. #ifndef __WindoidDefines__
  11. #define __WindoidDefines__
  12.  
  13. //******************************************************************************
  14. //    Conditional Compilation Options
  15. //------------------------------------------------------------------------------
  16. /*
  17.  
  18. The #define's you may make include:
  19.  
  20.     ALLOW_VERT -    This determines if the code that is compiled will support
  21.                     a palette that has a vertical title bar along the left
  22.                     side of the window (rather than the top). To create such
  23.                     a window, add one to the varcode that is used.
  24.  
  25.     ALLOW_GROW -    This option creates a WDEF that supports a grow box. This
  26.                     grow box behaves exactly like that of a standard document
  27.                     window. This addition to the code was provided to me by
  28.                     Jim Petrick.
  29.     
  30.     ALLOW_ZOOM -    This option creates a windoid that supports a zoombox.
  31.                     To add the zoombox to a windoid, add zoomDocProc to the
  32.                     procID when creating the window. 
  33.                     
  34.                     The application is responsible for setting the user state 
  35.                     and standard state Rects of the window for zooming. (When 
  36.                     a new window is created, both of these are initialized to 
  37.                     the bounds of the window. See the README for more 
  38.                     information).
  39.  
  40.     STAYPUT_ZOOM -    This option will cause both the user and standard Rects to
  41.                     be changed together, causing the zoomed in and out state
  42.                     to have the same topLeft at all times. If this is not set,
  43.                     the standard and user states have their own 'memories'.
  44.                     (Note: this behavior is not fully tested.)
  45.  
  46.     MFI_ZOOM -        This will cause the WDEF to handle the zoom box in the way
  47.                     expected by MicroFrontier applications (the same way as
  48.                     version 2.2). That is, the other state that is used is one
  49.                     which has a title bar with a small area (in which the host
  50.                     program displays a label for the windoid).
  51.                     
  52.     MACAPP_STYLE -    This determines if the varcodes that are supported are
  53.                     the one's I consider 'normal' or the ones MacApp's
  54.                     windoid WDEF knows about. Note, however, that this code
  55.                     only supports the 'smaller', title-less version that
  56.                     is available in MacApp's.
  57.  
  58.     THINK_STYLE -    This creates a version of the WDEF that is totally
  59.                     compatible with the varcodes used in the windoid WDEF 
  60.                     included with the THINK environments. 
  61.                     
  62.                     Two things are done: varcode 0 gives a normal titlebar, 
  63.                     varcode 2 gives a titlebar down the left side, and other 
  64.                     varcodes (i.e. 1,3,4,5,6,7) give no titlebar at all. 
  65.                     (Note that in my version, a zoom box may also be used 
  66.                     with this style.) Also, for the THINK style, ALWAYS_HILITE 
  67.                     is also set, as this is how theirs works.
  68.  
  69.     ALWAYS_HILITE -    This will cause a windoid to be created that will always
  70.                     draw its title bar with gadgets and all. Normally, the
  71.                     windoid will draw the titlebar and frame in gray and
  72.                     empty when the window is not hilighted (like normal
  73.                     windows). Some programs, however, don't keep their
  74.                     windoids properly hilighted, so this will make them 
  75.                     appear to always be active.
  76.  
  77.     VERS_2_2_COMPATIBLE - This creates a version of the WDEF that is 
  78.                     functionally compatible with the version 2.2 windoid that
  79.                     I released. The only issue involved is the way the zooming
  80.                     is handled.
  81.  
  82.     THICK_TITLEBAR - Defining this will cause the titlebar of the windoid to
  83.                     be a little taller and include tinges along the outside
  84.                     that match those of document windows. 
  85.                     
  86.                     This is similar to Adobe's recent windoids, and also 
  87.                     similar to (but better than in my opinion) the floating 
  88.                     windows put up by Casper on the AV Macs. 
  89.                     
  90.                     This option works especially well if the window has a 
  91.                     grow box (the overall appearance of the windoid is better) 
  92.                     or if title strings are being shown, as descenders are 
  93.                     cut off with the thinner titlebar.
  94.  
  95.     TITLE_STRING -    Due to popular request and several commercial applications
  96.                     with titles in their floaters, I have implemented this
  97.                     option. When enabled, the windoid's title will appear
  98.                     centered in the titlebar. 
  99.                     
  100.                     Currently, this feature does not look at the script and 
  101.                     change the size of the titlebar as is recommended for 
  102.                     regions with an application font that doesn't work at 
  103.                     9 points. 
  104.                     
  105.                     Now, a note: I personally don't like the title showing in 
  106.                     the titlebar of a floater, since it makes it look more 
  107.                     like a document window. If you like them, though, the ones 
  108.                     I have implemented take everything into account.
  109.  
  110.     SYS7_OR_LATER - If this flag is set, a version of the WDEF that doesn't
  111.                     support the System 6 coloring will be compiled. Note that
  112.                     this version may crash on systems earlier than 7.0, so 
  113.                     your application should make sure to check for System 7
  114.                     or later.
  115.                     
  116.     USE_GESTALT -    Define this if you want to use Gestalt to determine the
  117.                     System and QuickDraw versions. Otherwise, SysEnvirons is
  118.                     used. (NOTE: using Gestalt in MPW will cause additional
  119.                     glue code to be attached to the WDEF resource, making it
  120.                     larger.)  With SYS7_OR_LATER, this is automatically
  121.                     defined.
  122.  
  123. ------------------------------------------------------------------------------*/
  124.  
  125. #define THICK_TITLEBAR
  126. // #define TITLE_STRING
  127.  
  128. #define ALLOW_ZOOM
  129. #define ALLOW_VERT
  130. // #define ALLOW_GROW
  131.  
  132. // #define SYS7_OR_LATER
  133.  
  134. #define VERS_2_2_COMPATIBLE
  135.  
  136. //******************************************************************************
  137. //    Combinations
  138. //        These should pretty much remain untouched
  139. //------------------------------------------------------------------------------
  140.  
  141. #ifdef VERS_2_2_COMPATIBLE
  142.     #ifndef MFI_ZOOM
  143.     #define MFI_ZOOM
  144.     #endif
  145.     
  146.     #ifndef STAYPUT_ZOOM
  147.     #define STAYPUT_ZOOM
  148.     #endif
  149. #endif
  150.  
  151. //------------------------------------------------------------------------------
  152.  
  153. #ifdef THINK_STYLE
  154.     #ifndef ALLOW_VERT
  155.     #define ALLOW_VERT
  156.     #endif
  157.  
  158.     #ifndef ALWAYS_HILITE
  159.     #define ALWAYS_HILITE
  160.     #endif
  161.  
  162.     #ifdef MACAPP_STYLE
  163.     #undef MACAPP_STYLE
  164.     #endif
  165. #endif
  166.  
  167. //------------------------------------------------------------------------------
  168.  
  169. #ifdef MACAPP_STYLE
  170.     #ifdef ALLOW_VERT
  171.     #undef ALLOW_VERT
  172.     #endif
  173.  
  174.     #ifdef ALWAYS_HILITE
  175.     #undef ALWAYS_HILITE
  176.     #endif
  177.  
  178.     #ifndef ALLOW_GROW
  179.     #define ALLOW_GROW
  180.     #endif
  181. #endif
  182.  
  183. //------------------------------------------------------------------------------
  184.  
  185. #ifdef SYS7_OR_LATER
  186.     #ifndef USE_GESTALT
  187.     #define USE_GESTALT
  188.     #endif
  189. #endif
  190.  
  191. //******************************************************************************
  192. //    System version define for the Apple Interfaces
  193. //------------------------------------------------------------------------------
  194.  
  195. #ifdef SYS7_OR_LATER
  196.     #define SystemSevenOrLater 1    
  197. #else
  198.     #define SystemSixOrLater 1        
  199. #endif
  200.  
  201.     // This is used so that we can cut down on the code size in MPW. If 
  202.     // support for earlier systems is important, get rid of this. 
  203.     // Note: for this define to work under THINK C, MacHeaders cannot be used.
  204.  
  205. //******************************************************************************
  206. #endif